package com.xdc.pigtestdemo.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.mapper.SqlCondition;

import java.io.Serializable;

/**
 * <p>
 * 设备表
 * </p>
 *
 * @author xiadc
 * @since 2018-07-27
 */
@TableName("test_device")
public class TestDevice extends Model<TestDevice> {

    private static final long serialVersionUID = 1L;

    private Integer id;
    //设置按设备名称模糊查询,默认是精确查询(不明白condition为啥未生效？？？)
    @TableField(condition = SqlCondition.NOT_EQUAL)
    private String deviceName;
    @TableField(condition = SqlCondition.LIKE)
    private String deviceType;
    @TableField("device_place")
    private String devicePlace;
    @TableField("hospital_name")
    private String hospitalName;
    @TableField("device_status")
    private String deviceStatus;
    @TableField("update_time")
    private Date updateTime;
    @TableField("del_flag")
    private String delFlag;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDevicePlace() {
        return devicePlace;
    }

    public void setDevicePlace(String devicePlace) {
        this.devicePlace = devicePlace;
    }

    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    public String getDeviceStatus() {
        return deviceStatus;
    }

    public void setDeviceStatus(String deviceStatus) {
        this.deviceStatus = deviceStatus;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TestDevice{" +
        ", id=" + id +
        ", deviceName=" + deviceName +
        ", deviceType=" + deviceType +
        ", devicePlace=" + devicePlace +
        ", hospitalName=" + hospitalName +
        ", deviceStatus=" + deviceStatus +
        ", updateTime=" + updateTime +
        ", delFlag=" + delFlag +
        "}";
    }
}
